<template>
    <div class="cases-content">
        <div class="title">产品整体解决方案，顶尖的服务</div>
        <div class="sub-title">浏览我们的产品与解决方案，并了解天奇能够为您做什么</div>

        <div class="btn-list">
            <el-button block class="item" color="#e5e5e5" v-for="(item, index) in btn_list" :key="item.name">
                {{ item.name }}
            </el-button>
        </div>

        <div class="data-list">
            <div class="data-item" v-for="(item, index) in data_list" :key="item.id">
                <img :src="item.pic" alt="">
                <div class="name">{{ item.name }}</div>
                <div class="type">{{ item.type }}</div>
            </div>
        </div>
    </div>
</template>

<script setup lang='ts'>
import { reactive, ref } from 'vue'

interface btnType {
    name: string,
    url: string
}

interface dataTye {
    name: string,
    type: string,
    pic: string,
    id: number
}

let btn_list: btnType[] = reactive([
    {
        name: '工艺装备',
        url: 'test'
    },
    {
        name: '装备工程',
        url: 'test'
    },
    {
        name: '工具刀具',
        url: 'test'
    },
    {
        name: '劳务维保',
        url: 'test'
    },
    {
        name: '再生资源',
        url: 'test'
    },
    {
        name: '更多解决方案>',
        url: 'test'
    },
])

let data_list: dataTye[] = reactive([
    { name: 'test', type: '工艺设备', pic: './images/banner/test.jpg', id: 1 },
    { name: 'test', type: '工艺设备', pic: './images/banner/test.jpg', id: 2 },
    { name: 'test', type: '工艺设备', pic: './images/banner/test.jpg', id: 3 },
    { name: 'test', type: '工艺设备', pic: './images/banner/test.jpg', id: 3 },
])
</script>

<style scoped lang='scss'>
.cases-content {
    width: 100%;
    background-color: #F8F8F8;

    .title,
    .sub-title {
        width: 100%;
        text-align: center;

    }

    .sub-title {
        height: 50px;
        line-height: 50px;
        margin-bottom: 30px;
    }

    .title {
        font-size: 32px;
        color: #333;
        height: 80px;
        line-height: 80px;
    }

    .btn-list {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        box-sizing: border-box;
        padding: 0 10%;
        margin-bottom: 50px;
    }

    .item {
        width: 183px;
        color: #666666;
        border-radius: 10px;
        height: 36px;
        box-sizing: border-box;
    }

    .data-list {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0 10%;
        padding-bottom: 30px;

    }

    .data-item {
        width: 24%;
        height: 300px;
        overflow: hidden;

        img {
            width: 100%;
            height: 80%;
            transition: all .3s linear;

            &:hover {
                transform: scale(1.1);
            }
        }


        .name {
            color: #333;
            font-size: 20px;
        }

        .type {
            color: #666;
            font-size: 12px;
        }
    }

    .el-button:hover {
        background-color: #1259E9;
        color: white;
    }

    @media (max-width:1470px) {
        .item {
            width: 30%;
            margin-bottom: 10px;
            margin-left: 0;
            margin-right: 10px;
        }

        .data-item {
            width: 100%;
        }
    }


}
</style>